package com.seal.dao.impl;

import java.util.List;

import org.hibernate.Query;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.seal.dao.BaseDaoImpl;
import com.seal.dao.IProvinceDao;
import com.seal.model.TProvince;

@Service("provinceDaoImpl")
@Transactional(readOnly = true)
public class ProvinceDaoImpl extends BaseDaoImpl implements IProvinceDao {

	public List<TProvince> getAllProvinces() throws Exception {
		String hql = new StringBuffer("from TProvince").toString();
		Query query =  this.getSession().createQuery(hql);
		List<TProvince> list=(List<TProvince>)query.list();
		return list;
	}
}
